# apps/kuaishou/strategies.py
from utils.base_strategies import DeleteStrategy
from .models import KuaishouVideo, KuaishouVideoComment

class KuaishouDeleteStrategy(DeleteStrategy):
    def delete_content(self, task_id):
        KuaishouVideo.objects.filter(task_id=task_id).delete()

    def delete_comments(self, task_id):
        content_ids = KuaishouVideo.objects.filter(task_id=task_id).values_list('video_id', flat=True)
        KuaishouVideoComment.objects.filter(video_id__in=content_ids).delete()